import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //查询额度设置列表
  getCreditList: (query) => api.post(`${config.interfaces.type5}counterparty-server/counterpartyCredit/getCredit`, query),
  //查询额度详情
  getCreditDetail: (query) => api.get(`${config.interfaces.type5}counterparty-server/counterpartyCredit/getBasic`, query),
  //新增额度设置
  addCredit: (query) => api.post(`${config.interfaces.type5}counterparty-server/counterpartyCredit/insertCredit`, query),
  //编辑额度设置
  updateCredit: (query) => api.post(`${config.interfaces.type5}counterparty-server/counterpartyCredit/updateCredit`, query),
  //删除额度设置
  deleteCredit: (query) => api.get(`${config.interfaces.type5}counterparty-server/counterpartyCredit/deleteCredit`, query),
  //查询短名
  getShortName: (query) => api.get(`${config.interfaces.type5}counterparty-server/counterparty/getShortName`, query),
  //审批流 对应的查询授信设置详情
  getCreditDetailProcess: (query) => api.get(`${config.interfaces.type5}counterparty-server/counterpartyProcess/getCreditBasic`, query),
  //审批流 对应的查询授信设置详情
  updateCreditProcess: (query) => api.post(`${config.interfaces.type5}counterparty-server/counterpartyProcess/updateCredit`, query),
};
